package com.gg.ai.controller;

import com.gg.ai.pojo.JsonVariable;
import com.gg.ai.service.ChatHistoryService;
import com.gg.ai.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/java/api/v1")
public class TestController {
    @Autowired
    private UserService userService;
    @Autowired
    private ChatHistoryService chatHistoryService;

    @GetMapping("/test1")
    public void Test1() {
       System.out.println( userService.queryOne(1));
    }

    @GetMapping("/test2")
    public void Test2() {
        JsonVariable.historyList = chatHistoryService.queryList(1,"1").getHistoryList();
        System.out.println(JsonVariable.historyList);
    }
}
